
function getdoc(){
	hui.ajax({
	    type : 'POST',
	    url : globleobj['domain']+'/doctor/getdoc',
	    data : {'doc_id':doctorUser.doc_id},
	    beforeSend : function(){hui.loading();},
	    complete   : function(){hui.closeLoading();},
	    success : function(msg){
	    	console.log('getdoc:'+msg)
	    	var data = JSON.parse(msg)
	    	if(data.rc != 0){
	    		hui.toast(data.msg);
	    		return false; 
	    	}
	    	localStorage.setItem("user",JSON.stringify(data.user));
//	    	console.log(localStorage.getItem("user"))
	    	hui(".personName").html(data.user.name);
	    	hui(".personPhone").html(data.user.phone);
	    	hui(".personDepart").html(data.user.depart);
	    	hui(".personTitle").html(data.user.title);
	    	hui(".personGroup").html(data.user.group);
	    	hui(".personhosName").html(data.user.hos_name);
	    	hui(".pensonSpecialty").html(data.user.specialty);
	    	
	    },
	    error : function(e){
	        console.log(JSON.stringify(e));
	        hui.iconToast('读取消息失败', 'warn');
	    } 
	}); 
}

function goLogin(){
	
	localStorage.removeItem("userInfos");
	sessionStorage.setItem("thatQuit",false);
	console.log('退出：'+sessionStorage.getItem("thatQuit"))
	console.log(JSON.stringify(hui.allViews()))
	hui.open('/html/login.html');
	hui.close('homepage.html')
	hui.close('personcenter.html')
}
hui.ready(function(){
	//getdoc();
	//跳转统计
	hui('#nav-news').click(function(){
	    hui.open('community.html');
	});
	//跳转应诊
	hui('#nav-home').click(function(){
	    hui.open('homepage.html');
	});
	//跳转应用
	hui('#nav-forum').click(function(){
	    hui.open('application.html');
	});
	//跳转公告
	hui('#goNotice').click(function(){
	    hui.open('/html/personcenter/notice.html');
	});
	//跳转投诉
	hui('#goComplaint').click(function(){
	    hui.open('/html/personcenter/complaint.html');
	});
	//跳转绩效
	hui('#goPerformance').click(function(){
	    hui.open('/html/personcenter/performance.html',{},true);
	});
    hui.plusReady(function(){
    	console.log('plusReady');
    });
});